#ifndef SOUND_H
#define SOUND_H

class Sound
{
	public:
		Sound(int a_id):id(a_id),volumen(16),effect(NO_EFFECT),panning(0),
				distance(0),position(0){}
		~Sound(){}

		typedef enum
		{
			NO_EFFECT,
			PANNING,
			DISTANCE,
			POSITION
		}effect_t;

		int getID()const{return id;}
		effect_t getEffect()const{return effect;}
		void setVolume(int v){volumen=v;}
		int getVolume()const{return volumen;}

		//right has values from -128 (sound plays only in the left
		//speaker) to 128 (sound plays only in the right speaker)
		void setPanning(int right);
		int getPanning()const{return panning;}
		//distance has values from 0 to 255
		void setDistance(int dis);
		int getDistance()const{return distance;}
		//distance the same above
		//angle, if is 0 the sound is directly front of us
		//if is 90 th sound is directly in the right 
		//if is 180 the sound is behind
		//if is 270 the sound is directly in the left
		void setPosition(int dis,int angle);
		int getPosition()const{return position;}

		void unregisterEffects(){effect=NO_EFFECT;}

	private:
		//This id is used by audiomanager to know what chunk has to play
		int id;
		//Volumen 1-16
		int volumen;

		effect_t effect;

		int panning;
		int distance;
		int position;
};

#endif
